import http from "@/utils/http";

export const pageSearchEmployeeAPI = (
  page: number,
  pageSize: number,
  status: number
) => {
  return http({
    url: "/api/v1/employee/page",
    method: "GET",
    params: {
      page,
      pageSize,
      status,
    },
  });
};

export const searchSingleEmployeeAPI = (phoneNum: number) => {
  return http({
    url: "/api/v1/employee/queryOneEmployee",
    method: "GET",
    params: {
      phoneNum,
    },
  });
};

export const updateEmployeeAPI = (
  id: string,
  username: string,
  password: string,
  roles: string,
  status: number
) => {
  return http({
    url: "/api/v1/employee/update",
    method: "POST",
    data: {
      id,
      username,
      password,
      roles,
      status,
    },
  });
};

export const deleteEmployeeAPI = (username: string) => {
  return http({
    url: "/api/v1/employee/delete",
    method: "DELETE",
    params: {
      username,
    },
  });
};


